<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/5/15
  Time: 15:20
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    //获取项目的根路径
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<html>
<head>
    <meta charset="utf-8">
    <title>CT表</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <%--导入layui的css样式--%>
    <link rel="stylesheet" href="<%=basePath%>static/layui-v2.6.5/layui/css/layui.css" media="all">
    <script type="text/javascript" src="<%=basePath%>static/layui-v2.6.5/layui/layui.js"></script>
    <link rel="stylesheet" href="<%=basePath%>static/dept/css/chaCt.css">
    <script type="text/javascript" src="<%=basePath%>static/jquery/jquery-1.12.4.js"></script>
</head>
<body>
<div class="chaCt-body">
    <div class="chaCt-host"><%--主页--%>
        <div class="chaCt-search"><%--搜索框条件--%>
            <form class="layui-form" action="${pageContext.request.contextPath}/dept/ctPage" method="post">
                诊断号:<input type="text" name="cdiagnoseNO" value="${cdiagnoseNO}">
                用户姓名:<input type="text" name="cuserName" value="${cuserName}">
                <button type="submit" class="layui-btn" lay-filter="demo1">查询</button>
            </form>
        </div>
        <%--显示数据--%>
        <div class="chaCt-centre">
            <table class="layui-table" lay-even lay-skin="row" lay-size="lg">
                <thead>
                <tr class="centre-tr">
                    <td>诊断号</td>
                    <td>用户姓名</td>
                    <td>检查时间</td>
                    <td>检查类型</td>
                    <td>检查部位</td>
                    <td>检查结果</td>
                    <td>检查医生</td>
                </tr>
                </thead>
                <tbody>

                <c:if test="${pageInfo.pages>0}">
                    <c:forEach items="${pageInfo.list}" var="ctPage">
                        <tr class="centre-tr1">
                            <td>${ctPage.cdiagnoseNO}</td>
                            <td>${ctPage.cuserName}</td>
                            <td>${ctPage.ctime}</td>
                            <td>${ctPage.checkType}</td>
                            <td>${ctPage.inspectionItem}</td>
                            <td>${ctPage.diagnose}</td>
                            <td>${ctPage.doctorName}</td>
                        </tr>
                    </c:forEach>
                </c:if>

                <c:if test="${pageInfo.pages<=0}">
                    <h2 class="cneter-h2">没有相关数据</h2>
                </c:if>

                </tbody>
            </table>
            <%--显示结束--%>
            <div class="chaCt-base"><%--页面上下页--%>
                <%--设置首页--%>
                <a href="${pageContext.request.contextPath}/dept/ctPage?pageNum=${pageInfo.firstPage}&cdiagnoseNO=${cdiagnoseNO}&cuserName=${cuserName}">首页</a>
                <a href="${pageContext.request.contextPath}/dept/ctPage?pageNum=${pageInfo.prePage}&cdiagnoseNO=${cdiagnoseNO}&cuserName=${cuserName}">上一页</a>
                ${pageInfo.pageNum}/${pageInfo.pages}
                <a href="${pageContext.request.contextPath}/dept/ctPage?pageNum=${pageInfo.nextPage}&cdiagnoseNO=${cdiagnoseNO}&cuserName=${cuserName}">下一页</a>
                <%--设置尾页--%>
                <a href="${pageContext.request.contextPath}/dept/ctPage?pageNum=${pageInfo.lastPage}&cdiagnoseNO=${cdiagnoseNO}&cuserName=${cuserName}">尾页</a>
            </div>
            <%--页面上下页--%>
        </div>
    </div>
</div>
</body>
</html>
